const request = require('./request')

const BASE_URL = '/finance/goal'

/**
 * 初始化参数获取
 * @returns 
 */
function goalInit() {
  return request.get(BASE_URL + '/init')
}

/**
 * 目标提交
 * @returns 
 */
function goalSubmit(params) {
  return request.post(BASE_URL + '/submit', params)
}

/**
 * 删除目标
 * @param {*} goalId 目标id
 * @returns 
 */
function goalDelete(goalId) {
  return request.post(BASE_URL + '/delete/'+ goalId)
}

module.exports = {
  goalInit,
  goalSubmit,
  goalDelete
} 